import request from "@/utils/axios/request";
import { MyTag } from "..";

const getTags = (params: { pageNum: any; pageSize: any; name: any; }) => {
  return request.get(`/bank/getTag?pageNum=${params.pageNum}&pageSize=${params.pageSize}&name=${params.name}`)
}

const delTags = (ids: number[]) => {
  return request.post(`/bank/delTags`, ids)
}

const addTag = (tag: MyTag) => {
  return request.post('/bank/addTag', tag)
}

const updateTag = (tag: MyTag) => {
  return request.post('/bank/updateTag', tag)
}

const tagApi = {
  getTags,
  delTags,
  addTag,
  updateTag,
}

export default tagApi